import  axios from  'axios'

export default class DoctorManage {
    static doctorManage = null

    static getInstance(){
        if(this.doctorManage == null){
            this.doctorManage = new DoctorManage()
        }
        return this.doctorManage
    }

    //查询医生基本信息
    list(params){
        return axios.get(`http://localhost/authority/doctorManage`,{params:{"true_name":params}})
    }

    //禁用医生
    del(id){
        return axios.delete(`http://localhost/authority/doctorManage/${id}`)
    }

    //查看被禁用的医生个数
    getDoctorCount(){
        return axios.get(`http://localhost/authority/doctorManage/getdoctorcount`)
    }


    //查看被禁用的医生
    showDoctors(){
        return axios.get(`http://localhost/authority/doctorManage/showdoctors`)
    }

    //启用禁用的医生
    update(params){
        return axios.put(`http://localhost/authority/doctorManage`, {params})
    }



}
